import axios from "axios";

//创建一个axios对象
const request = axios.create({
        baseURL: 'http://localhost:8088/',
        timeout: 150000
    }
)


request.interceptors.response.use(
    responese => {
        let res = responese.data;
        if (typeof res === 'string'){
            res=res?JSON.parse(res):res
        }
        return res
    },error => {
        console.log('err'+error)
        return Promise.reject(error)
    }
)

export default request